<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no" />  
    <title>优秀青年志愿者服务队答辩投票</title>
    <link rel="stylesheet" href="/vote2016/static/style/weui.min.css">
    <link rel="stylesheet" href="/vote2016/static/style/index.min.css">
</head>
<body>
    <div class="container">
        <section class="hd">
            <h1 class="title">青年志愿者投票</h2>
        </section>
        <section>
            <div class="weui_cells_title">点击学院查看详情</div>
            <div class="weui_cells weui_cells_access">
                <% data.forEach(function (item, index) {%>
                    <a class="weui_cell" href="/vote2016/detail?id=<%=item.Aid%>" >
                        <div class="weui_cell_bd weui_cell_primary">
                            <p><%=item.Aname%>学院</p>
                        </div>
                        <div class="weui_cell_ft">
                        </div>
                    </a>
                <%})%>
            </div>
        </section>
        <section class="explain">
            <div class="weui_panel weui_panel_access">
                <div class="weui_panel_bd">
                    <div class="weui_media_box weui_media_text">
                        <h4 class="weui_media_title">投票规则：</h4>
                        <p class="weui_media_desc">投票时间: 3月22日-3月28日
                        一个人一天只能投一次票,一次必须投5票</p>
                    </div>
                </div>
            </div>
        </section>
        <section class="bd">
            <form action="/home/index/vote" method="GET">
                <div class="weui_cells_title">向他们投票：</div>
                <div class="weui_cells weui_cells_checkbox">
                    <% data.forEach(function (item, index) {%>
                        <div class="weui_cell weui_check_label">
                            <div class="weui_cell_hd">
                                <input type="checkbox" class="weui_check" name="<%=item.Aid%>">
                                <i class="weui_icon_checked"></i>
                            </div>
                            <div class="weui_cell_bd weui_cell_primary">
                                <p><%=item.Aname%>学院<span class="vote_quantity"><%=item.Avote%>票</span></p>
                            </div>
                        </div>
                    <%})%>
                </div>
                <div class="weui_btn_area">
                    <a id="submit_btn" href="##" class="weui_btn weui_btn_primary weui_btn_disabled" type="submit">提交</a>
                </div>
            </form>
        </section>
        <footer>© 红岩网校工作站</footer>
        <!-- 弹出层 -->
        <section>
            <div class="weui_dialog_alert" style="display: none;">
                <div class="weui_mask"></div>
                <div class="weui_dialog">
                    <div class="weui_dialog_hd">
                      <strong class="weui_dialog_title">提示</strong>
                    </div>
                    <div class="weui_dialog_bd">一次只能投5个哦~</div>
                    <div class="weui_dialog_ft">
                        <a href="javascript:;" class="weui_btn_dialog primary">确定</a>
                    </div>
                </div>
            </div>


            <div id="toast" style="display: none;">
                <div class="weui_mask_transparent"></div>
                <div class="weui_toast">
                    <i class="weui_icon_toast"></i>
                    <p class="weui_toast_content">已提交</p>
                </div>
            </div>
            
            <div id="loadingToast" class="weui_loading_toast" style="display:none;">
                <div class="weui_mask_transparent"></div>
                <div class="weui_toast">
                    <div class="weui_loading">
                        <!-- :) -->
                        <div class="weui_loading_leaf weui_loading_leaf_0"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_1"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_2"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_3"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_4"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_5"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_6"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_7"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_8"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_9"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_10"></div>
                        <div class="weui_loading_leaf weui_loading_leaf_11"></div>
                    </div>
                    <p class="weui_toast_content">提交ing</p>
                </div>
            </div>
        </section>
    </div>
    <script src="http://a.alipayobjects.com/??amui/zepto/1.1.3/zepto.js,static/fastclick/1.0.6/fastclick.min.js"></script>
    <script>FastClick.attach(document.body);</script>
    <script src="/vote2016/static/script/index.js?h=<%=new Date().getTime()%>"></script>
    <script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script>
    var TITLE = '青年志愿者投票';
    var DESC = '青年志愿者投票';
    var LINK = 'http://hongyan.cqupt.edu.cn/vote2016/index';
    var IMGURL = 'https://dn-redrock.qbox.me/cyxbs_logo.jpg';
    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: '<%=jsSdk.appid%>', // 必填，公众号的唯一标识
        timestamp: '<%=jsSdk.timeStamp%>', // 必填，生成签名的时间戳
        nonceStr: '<%=jsSdk.str%>', // 必填，生成签名的随机串
        signature: '<%=jsSdk.signature%>',// 必填，签名，见附录1
        jsApiList: [
        'onMenuShareTimeline', 
        'onMenuShareAppMessage', 
        'onMenuShareQQ',
        'onMenuShareWeibo',
        'onMenuShareQZone'
        ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });
    wx.ready(function () {
         wx.onMenuShareTimeline({
                title: TITLE,
                link: LINK, 
                imgUrl: IMGURL,
                success: function () {
                },
                cancel: function () {
                }
            });
            wx.onMenuShareAppMessage({
                title: TITLE,
                desc: DESC,
                link: LINK,
                imgUrl: IMGURL,
                type: '',
                success: function () {
                },
                cancel: function () {
                }
            });
            wx.onMenuShareQQ({
                title: TITLE,
                desc: DESC,
                link: LINK,
                imgUrl: IMGURL,
                success: function () {
                },
                cancel: function () {
                }
            });
            wx.onMenuShareWeibo({
                title: TITLE,
                desc: DESC,
                link: LINK,
                imgUrl: IMGURL,
                success: function () {
                },
                cancel: function () {
                }
            });
            wx.onMenuShareQZone({
                title: TITLE,
                desc: DESC,
                link: LINK,
                imgUrl: IMGURL,
                success: function () {
                },
                cancel: function () {
                }
            });
    });
    wx.error(function(res){
        // config信息验证失败会执行error函数，如签名过期导致验证失败，具体错误信息可以打开config的debug模式查看，也可以在返回的res参数中查看，对于SPA可以在这里更新签名。
    
    });
    </script>
</body>
</html>